body {
    font-family: Arial, sans-serif;
    margin: 0;
    padding: 0;
    background-color: #f4f4f4;
}

.container {
    display: flex;
}

.sidebar {
    width: 200px;
    background-color: #fff;
    padding: 20px;
    box-shadow: 2px 0 5px rgba(0,0,0,0.1);
}

.sidebar h2 {
    font-size: 18px;
    margin-bottom: 20px;
}

.sidebar ul {
    list-style-type: none;
    padding: 0;
}

.sidebar li {
    padding: 10px;
    cursor: pointer;
}

.sidebar li:hover {
    background-color: #f0f0f0;
}

.main-content {
    flex-grow: 1;
    padding: 20px;
}

.main-content input {
    width: 100%;
    padding: 10px;
    margin-bottom: 20px;
    font-size: 16px;
}

.product-list {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
}

.product {
    background-color: #fff;
    border-radius: 5px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    width: calc(25% - 20px); /* 每行显示4个产品 */
    box-sizing: border-box;
    padding: 10px;
    display: flex;
    flex-direction: column;
    margin-bottom: 20px; /* 增加每个产品框的外边距 */
    height: 300px; /* 固定商品卡片高度 */
}

.product img {
    width: 100%; /* 图片宽度100% */
    height: 60%; /* 图片高度为卡片高度的60% */
    border-radius: 8px;
    margin-bottom: 10px;
}

.product-info {
    padding-top: 10px;
    flex-grow: 1; /* 使信息部分填充剩余空间 */
}

.product h3 {
    margin: 0;
    font-size: 16px;
}

.product p {
    margin: 5px 0 0;
    color: #e74c3c;
    font-size: 18px;
}

.product del {
    color: #999;
    margin-left: 10px;
}

/* 适配小屏幕设备，改为垂直排列 */
@media (max-width: 768px) {
    .product {
        width: calc(50% - 20px); /* 每行显示2个产品 */
        height: auto; /* 自动调整高度 */
    }
}